using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._ModelTools._ModelOnly
{
    /// <summary>
    /// <para>If Value Is</para>
    /// <para>Evaluates an input value compared to a single value, a list of values, or a range of values using a defined comparison operator.</para>
    /// <para>使用定义的比较运算符将输入值与单个值、值列表或值范围进行比较。</para>
    /// </summary>    
    [DisplayName("If Value Is")]
    public class ValueIsIfThenElse : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ValueIsIfThenElse()
        {

        }
        public override string ToolboxName => "Model Tools";

        public override string ToolName => "If Value Is";

        public override string CallName => "mb.ValueIsIfThenElse";

        public override List<string> AcceptEnvironments => [];

        public override object[] ParameterInfo => [_input_value, _value_test.GetGPValue(), _comparison_type.GetGPValue(), _values, _range_values, _comparison_value, _true, _false];

        /// <summary>
        /// <para>Input Value</para>
        /// <para>The input value to evaluate.</para>
        /// <para>要计算的输入值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Value")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _input_value { get; set; } = null;


        /// <summary>
        /// <para>Value Test</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of comparison operator to use.</para>
        ///   <bulletList>
        ///     <bullet_item>Is equal to at least one value—Determine whether the input value is equal to any one of the comparison values. This is the default.</bullet_item><para/>
        ///     <bullet_item>Does not match at least one value—Determine whether the input value is not equal to any one of the comparison values.</bullet_item><para/>
        ///     <bullet_item>Does not match every value—Determine whether the input value is not equal to every comparison value.</bullet_item><para/>
        ///     <bullet_item>Is between any one range of values—Determine whether the input value is between any one range of comparison values.</bullet_item><para/>
        ///     <bullet_item>Is not between any range of values— Determine whether the input value is not between any range of comparison values.</bullet_item><para/>
        ///     <bullet_item>Is less than—Determine whether the input value is less than the comparison value.</bullet_item><para/>
        ///     <bullet_item>Is greater than—Determine whether the input value is greater than the comparison value.</bullet_item><para/>
        ///     <bullet_item>Is less than or equal to—Determine whether the input value is less than or equal to the comparison value.</bullet_item><para/>
        ///     <bullet_item>Is greater than or equal to—Determine whether the input value is greater than or equal to the comparison value.</bullet_item><para/>
        ///     <bullet_item>Is empty—Determine whether the input value is empty.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要使用的比较运算符的类型。</para>
        ///   <bulletList>
        ///     <bullet_item>等于至少一个值 - 确定输入值是否等于任何一个比较值。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>不匹配至少一个值 - 确定输入值是否不等于任何一个比较值。</bullet_item><para/>
        ///     <bullet_item>不匹配每个值 - 确定输入值是否不等于每个比较值。</bullet_item><para/>
        ///     <bullet_item>位于任意一个值范围之间 - 确定输入值是否位于任意一个比较值范围之间。</bullet_item><para/>
        ///     <bullet_item>不在任何值范围之间 - 确定输入值是否不在任何比较值范围之间。</bullet_item><para/>
        ///     <bullet_item>小于- 确定输入值是否小于比较值。</bullet_item><para/>
        ///     <bullet_item>大于 - 确定输入值是否大于比较值。</bullet_item><para/>
        ///     <bullet_item>小于或等于 - 确定输入值是否小于或等于比较值。</bullet_item><para/>
        ///     <bullet_item>大于或等于- 确定输入值是否大于或等于比较值。</bullet_item><para/>
        ///     <bullet_item>为空 - 确定输入值是否为空。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Value Test")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _value_test_value _value_test { get; set; } = _value_test_value._IS_EQUAL_TO_ANY;

        public enum _value_test_value
        {
            /// <summary>
            /// <para>Is equal to at least one value</para>
            /// <para>Is equal to at least one value—Determine whether the input value is equal to any one of the comparison values. This is the default.</para>
            /// <para>等于至少一个值 - 确定输入值是否等于任何一个比较值。这是默认设置。</para>
            /// </summary>
            [Description("Is equal to at least one value")]
            [GPEnumValue("IS_EQUAL_TO_ANY")]
            _IS_EQUAL_TO_ANY,

            /// <summary>
            /// <para>Does  not match at least one value</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("Does  not match at least one value")]
            [GPEnumValue("IS_NOT_EQUAL_TO_ANY")]
            _IS_NOT_EQUAL_TO_ANY,

            /// <summary>
            /// <para>Does not match every value</para>
            /// <para>Does not match every value—Determine whether the input value is not equal to every comparison value.</para>
            /// <para>不匹配每个值 - 确定输入值是否不等于每个比较值。</para>
            /// </summary>
            [Description("Does not match every value")]
            [GPEnumValue("IS_NOT_EQUAL_TO_ALL")]
            _IS_NOT_EQUAL_TO_ALL,

            /// <summary>
            /// <para>Is between any one range of values</para>
            /// <para>Is between any one range of values—Determine whether the input value is between any one range of comparison values.</para>
            /// <para>位于任意一个值范围之间 - 确定输入值是否位于任意一个比较值范围之间。</para>
            /// </summary>
            [Description("Is between any one range of values")]
            [GPEnumValue("IS_BETWEEN_ANY")]
            _IS_BETWEEN_ANY,

            /// <summary>
            /// <para>Is not between any range of values</para>
            /// <para>Is not between any range of values— Determine whether the input value is not between any range of comparison values.</para>
            /// <para>不在任何值范围之间 - 确定输入值是否不在任何比较值范围之间。</para>
            /// </summary>
            [Description("Is not between any range of values")]
            [GPEnumValue("IS_NOT_BETWEEN_ANY")]
            _IS_NOT_BETWEEN_ANY,

            /// <summary>
            /// <para>Is less than</para>
            /// <para>Is less than—Determine whether the input value is less than the comparison value.</para>
            /// <para>小于- 确定输入值是否小于比较值。</para>
            /// </summary>
            [Description("Is less than")]
            [GPEnumValue("IS_LESS_THAN")]
            _IS_LESS_THAN,

            /// <summary>
            /// <para>Is greater than</para>
            /// <para>Is greater than—Determine whether the input value is greater than the comparison value.</para>
            /// <para>大于 - 确定输入值是否大于比较值。</para>
            /// </summary>
            [Description("Is greater than")]
            [GPEnumValue("IS_GREATER_THAN")]
            _IS_GREATER_THAN,

            /// <summary>
            /// <para>Is less than or equal to</para>
            /// <para>Is less than or equal to—Determine whether the input value is less than or equal to the comparison value.</para>
            /// <para>小于或等于 - 确定输入值是否小于或等于比较值。</para>
            /// </summary>
            [Description("Is less than or equal to")]
            [GPEnumValue("IS_LESS_THAN_OR_EQUAL")]
            _IS_LESS_THAN_OR_EQUAL,

            /// <summary>
            /// <para>Is greater than or equal to</para>
            /// <para>Is greater than or equal to—Determine whether the input value is greater than or equal to the comparison value.</para>
            /// <para>大于或等于- 确定输入值是否大于或等于比较值。</para>
            /// </summary>
            [Description("Is greater than or equal to")]
            [GPEnumValue("IS_GREATER_THAN_OR_EQUAL")]
            _IS_GREATER_THAN_OR_EQUAL,

            /// <summary>
            /// <para>Is empty</para>
            /// <para>Is empty—Determine whether the input value is empty.</para>
            /// <para>为空 - 确定输入值是否为空。</para>
            /// </summary>
            [Description("Is empty")]
            [GPEnumValue("IS_EMPTY")]
            _IS_EMPTY,

        }

        /// <summary>
        /// <para>Comparison Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of data comparison to use.</para>
        ///   <bulletList>
        ///     <bullet_item>Case insensitive string—The input value is compared to the comparison values as a case insensitive string. This is the default.</bullet_item><para/>
        ///     <bullet_item>Case sensitive string—The input value is compared to the comparison values as a case sensitive string.</bullet_item><para/>
        ///     <bullet_item>Long—The input numeric value is compared to the comparison values as a Long type.</bullet_item><para/>
        ///     <bullet_item>Double— The input numeric value is compared to the comparison values as a Double type.</bullet_item><para/>
        ///     <bullet_item>Automatic data type detection—The input data type is checked and an equivalent data type comparison is performed. For example, compare the input and comparison values using string comparison for string type, long for long, and double for double. All other input data types use the default string comparison method.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要使用的数据比较类型。</para>
        ///   <bulletList>
        ///     <bullet_item>不区分大小写的字符串 - 将输入值与比较值作为不区分大小写的字符串进行比较。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>区分大小写的字符串 - 将输入值作为区分大小写的字符串与比较值进行比较。</bullet_item><para/>
        ///     <bullet_item>Long - 将输入数值与比较值作为 Long 类型进行比较。</bullet_item><para/>
        ///     <bullet_item>Double— 将输入数值与比较值作为 Double 类型进行比较。</bullet_item><para/>
        ///     <bullet_item>自动数据类型检测 - 检查输入数据类型并执行等效数据类型比较。例如，使用字符串比较来比较输入值和比较值，将字符串类型用于 long，使用 double 用于 double。所有其他输入数据类型都使用默认的字符串比较方法。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Comparison Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _comparison_type_value _comparison_type { get; set; } = _comparison_type_value._STRING_CASE_INSENSITIVE;

        public enum _comparison_type_value
        {
            /// <summary>
            /// <para>Case insensitive string</para>
            /// <para>Case insensitive string—The input value is compared to the comparison values as a case insensitive string. This is the default.</para>
            /// <para>不区分大小写的字符串 - 将输入值与比较值作为不区分大小写的字符串进行比较。这是默认设置。</para>
            /// </summary>
            [Description("Case insensitive string")]
            [GPEnumValue("STRING_CASE_INSENSITIVE")]
            _STRING_CASE_INSENSITIVE,

            /// <summary>
            /// <para>Case sensitive string</para>
            /// <para>Case sensitive string—The input value is compared to the comparison values as a case sensitive string.</para>
            /// <para>区分大小写的字符串 - 将输入值作为区分大小写的字符串与比较值进行比较。</para>
            /// </summary>
            [Description("Case sensitive string")]
            [GPEnumValue("STRING_CASE_SENSITIVE")]
            _STRING_CASE_SENSITIVE,

            /// <summary>
            /// <para>Long</para>
            /// <para>Long—The input numeric value is compared to the comparison values as a Long type.</para>
            /// <para>Long - 将输入数值与比较值作为 Long 类型进行比较。</para>
            /// </summary>
            [Description("Long")]
            [GPEnumValue("LONG")]
            _LONG,

            /// <summary>
            /// <para>Double</para>
            /// <para>Double— The input numeric value is compared to the comparison values as a Double type.</para>
            /// <para>Double— 将输入数值与比较值作为 Double 类型进行比较。</para>
            /// </summary>
            [Description("Double")]
            [GPEnumValue("DOUBLE")]
            _DOUBLE,

            /// <summary>
            /// <para>Automatic data type detection</para>
            /// <para>Automatic data type detection—The input data type is checked and an equivalent data type comparison is performed. For example, compare the input and comparison values using string comparison for string type, long for long, and double for double. All other input data types use the default string comparison method.</para>
            /// <para>自动数据类型检测 - 检查输入数据类型并执行等效数据类型比较。例如，使用字符串比较来比较输入值和比较值，将字符串类型用于 long，使用 double 用于 double。所有其他输入数据类型都使用默认的字符串比较方法。</para>
            /// </summary>
            [Description("Automatic data type detection")]
            [GPEnumValue("AUTO")]
            _AUTO,

        }

        /// <summary>
        /// <para>Values</para>
        /// <para>The list of values to compare to the input value.</para>
        /// <para>要与输入值进行比较的值列表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Values")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public List<object> _values { get; set; } = null;


        /// <summary>
        /// <para>Range Values</para>
        /// <para><xdoc>
        ///   <para>Specifies the range values to compare to the input value.</para>
        ///   <bulletList>
        ///     <bullet_item>Minimum—The input value is compared to the minimum value in the range.</bullet_item><para/>
        ///     <bullet_item>Maximum—The input value is compared to the maximum value in the range.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定要与输入值进行比较的范围值。</para>
        ///   <bulletList>
        ///     <bullet_item>最小值 - 将输入值与范围内的最小值进行比较。</bullet_item><para/>
        ///     <bullet_item>最大值 - 将输入值与范围内的最大值进行比较。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Range Values")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _range_values { get; set; } = null;


        /// <summary>
        /// <para>Comparison Value</para>
        /// <para>The single value to compare to the input value.</para>
        /// <para>要与输入值进行比较的单个值。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Comparison Value")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _comparison_value { get; set; } = null;


        /// <summary>
        /// <para>True</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("True")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _true { get; set; }


        /// <summary>
        /// <para>False</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("False")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _false { get; set; }


        public ValueIsIfThenElse SetEnv()
        {
            base.SetEnv();
            return this;
        }

    }

}